﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace SalaryChannel.Web
{
    public partial class index : System.Web.UI.Page
    {
       static System.Text.RegularExpressions.Regex agentReg = new System.Text.RegularExpressions.Regex(@"iemobile|iphone|ipod|android|nokia|sonyericsson|blackberry|samsung|sec\-|windows ce|motorola|mot\-|up.b|midp\-",
                System.Text.RegularExpressions.RegexOptions.IgnoreCase
               );
        protected void Page_Load(object sender, EventArgs e)
        {
           
            string UserAgent = Request.ServerVariables["HTTP_USER_AGENT"];
            if (!string.IsNullOrEmpty(UserAgent))
            {
                if (agentReg.IsMatch(UserAgent))
                {
                    Response.Redirect("~/wap/loginform.aspx");
                }
                else
                {

                } Response.Redirect("default.aspx");
            }
           
        }
    }
}